package com.huabo.fxgl.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author LiYe
 * @since 2022-08-05
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("TBL_YY_TEAM")
public class YyTeam implements Serializable {

    private static final long serialVersionUID = 1L;

    /*未找到Oracle数据库中对应的序列，顾使用MP生成的主键用作为下一个team的主键*/
    @TableId(type = IdType.ASSIGN_ID)
    private BigDecimal teamid;

    private String teamname;

    private LocalDateTime createdate;

//    private BigDecimal staffid;

    @TableField(value = "STAFFID", property = "staff.staffid", exist = false)
    private Staff staff;

//    private BigDecimal companyid;
    @TableField(value = "COMPANYID", property = "organization.orgid", exist = false)
    private Organization organization;

    @TableField(exist = false)
    private Long companyCount;//分组下公司总数
}
